# Makefile for SM4 Project

CC = gcc
CFLAGS = -Wall -O2 -I./include
LDFLAGS = 

# 源文件
SOURCES = src/sm4_core.c src/main.c

# 可执行文件
TARGET = sm4_demo

# 默认目标
all: $(TARGET)

# 编译可执行文件
$(TARGET): $(SOURCES)
	$(CC) $(CFLAGS) $(SOURCES) -o $(TARGET) $(LDFLAGS)

# 清理
clean:
	rm -f $(TARGET)

# 运行测试
run: $(TARGET)
	./$(TARGET)

# 显示项目结构
tree:
	@echo "项目文件:"
	@find . -name "*.c" -o -name "*.h" -o -name "Makefile" | sort

.PHONY: all clean run tree
